package com.deke.home.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.deke.entity.TbZone;
import com.deke.entity.TbZoneCourse;
import com.deke.home.service.TbZoneCourseService;
import com.deke.vo.Result;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：ludi
 * @date ：Created in 2022/12/5 23:16
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("/home/zone-course")
public class TbZoneCourseController {

    @Autowired
    private TbZoneCourseService tbZoneCourseService;


    @ApiOperation(value = "分页查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage", value = "当前页码"),
            @ApiImplicitParam(name = "pageSize", value = "每页显示的条数")
    })
    @PostMapping("getAllDetail/{currentPage}/{pageSize}")
    public Result<IPage<TbZoneCourse>> getAllDetail(@PathVariable(required = true,value = "currentPage") Integer current, @PathVariable(required = true) Integer pageSize, @RequestBody TbZoneCourse tbZoneCourse) {
        return tbZoneCourseService.queryByConditionPage(current, pageSize, tbZoneCourse);
    }
}
